<div class="feature-wrapper">

        <!--feature-wrapper -->
        <div class="featured">
          <div class="profile4">
            
            <div class="MAIN-login-wrapper"><br /><br />
            {if not $emails}
              <div class="login-wrapper">
                <div class="login-member">
                  <span class="title-login">Invite your friends from Gmail<br /><br /><br />
                  
                  <form method="post" action="">
                  <input type="hidden" name="gmail" value="1" />
                  <table>
                  	<tr>
                  		<td width="110">Email:</td>
                  		<td><input type="text" name="Email" value="{$smarty.post.Email}" class="imput-field" /></td>
                  	</tr>
                  	<tr>
                  		<td>Password:</td>
                  		<td><input type="password" name="Passwd" class="imput-field" /></td>
                  	</tr>
                  	<tr>
                  		<td></td>
                  		<td><input type="submit" value="Get Contacts" style="padding:10px;" /></td>
                  	</tr>
                  </table>
                  </form>
                  {if $error}
                  <br/>
                  <span style="margin:2px;background:#ca4;">{$error}</span>
                  {/if}
                </div>
              </div>
                  {else}
                  <span class="title-login">Invite your friends from Gmail</span><br /><br /><br />
                  {if $error}
                  <span style="color:#f00;">{$error}</span>
                  <br/><br/>
                  {/if}
                  <form action="" method="post" id="invitation-form">
                  <input type="hidden" name="invite" value="1" />
                  <input type="hidden" name="token" value="{$token}" />
                  <table width="98%">
                  	<tr style="background:#ccc;">
                  		<td style="padding:10px;font-weight:bold;">
                  		<input type="checkbox" class="all" /></td>
                  		<td style="padding:10px;font-weight:bold;">Email</td>
                  		<td style="padding:10px;font-weight:bold;">Name</td>
                  	</tr>
                  	{foreach from=$emails item=_email}
                  	<tr style="background:#{cycle values='fff,dedede'};">
                  		<td style="padding:10px;">
                  		<input type="checkbox" name="emails[]" value="{$_email.email}" /></td>
                  		<td style="padding:10px;" title="{$_email.email}">{$_email.email|truncate:30}</td>
                  		<td style="padding:10px;" title="{$_email.name}">{$_email.name|truncate:30}</td>
                  	</tr>
                  	{/foreach}
                  </table>
                  <input type="submit" value="Invite Selected &gt;&gt;" style="padding:10px;" />
                  </form>
                  {/if}
              
            </div>
          </div>

          <div class="footer-paper">&nbsp;</div>
        </div>
      </div>
      <!--end feature-wrapper -->
      <div class="feature-wrapper">
        <!--feature-wrapper -->
      </div>
      <!--feature-wrapper -->
    </div>

    <!--feature-wrapper -->
    
    {literal}
    <script type="text/javascript">
    $(function() {
		$("#invitation-form input.all").change(function() {
			$("#invitation-form input").attr("checked", $(this).attr("checked"));
		});
	});
    </script>
    {/literal}
    
